package com.liush.srb.sms.feign;

import com.liush.srb.base.result.ResponseVo;
import com.liush.srb.sms.feign.fallback.CoreClientFallback;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

//service-core可以去注册中心获取到服务的ip+端口号
@FeignClient(value = "service-core", fallback = CoreClientFallback.class)
public interface CoreClient {
    //接口方法 封装要访问的服务器中的资源路径
    @ApiOperation("判断手机号是否已被注册")
    @GetMapping("/api/core/userInfo/isUsed/{mobile}")
    public ResponseVo isUsed(@PathVariable("mobile") String mobile);
}
